<?xml version="1.0" encoding="ISO-8859-1" ?>
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>header</title>
</head>
<body>
	<ui:composition>
		<h1>Login</h1>
		<h:form id="mainForm" rendered="#{!user.loggedIn}">
			<h:panelGrid columns="2">
				<h:outputLabel for="name" value="Login name" />
				<h:inputText id="name" value="#{login.loginName}" required="true" />
				<h:outputLabel for="pwd" value="Password" />
				<h:inputSecret id="pwd" value="#{login.pwd}" redisplay="false" required="true" />
				<h:commandButton value="Press me" action="#{login.login}" />
				<h:messages showDetail="true" showSummary="false" />
			</h:panelGrid>
		</h:form>
		<h:panelGroup rendered="#{user.loggedIn}">
			<p>You already are logged in as <b><h:outputText value=" #{user.displayName}"/></b>.</p>
		</h:panelGroup>
	</ui:composition>
</body>
</html>
